﻿using DaprPlus.AutoMapper;
using DaprPlus.Mapping;

using Microsoft.Extensions.DependencyInjection;


namespace Todos.Infrastructure.AutoMapper;

public class GamesAutoMapperModule : AutoMapperModule
{
    /// <summary>
    /// 将模块服务添加到依赖注入服务容器中
    /// </summary>
    /// <param name="services">依赖注入服务容器</param>
    /// <returns></returns>
    public override IServiceCollection AddServices(IServiceCollection services)
    {
        base.AddServices(services);

        services.AddSingleton<IMapTuple, RoleResourceMapper>();
        services.AddSingleton<IMapTuple, TodoListMapper>();

        return services;
    }
}